package com.button.springbootclickhouse.service.impl;

import com.button.springbootclickhouse.entity.Order;
import com.button.springbootclickhouse.mapper.OrderMapper;
import com.button.springbootclickhouse.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description
 * @Author Administrator
 * @Date 2023/1/30 16:14
 **/
@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    private OrderMapper orderMapper;

    /**
     * 保存
     *
     * @param order
     * @Description 保存
     * @Param order
     * @Return void
     * @Author Administrator
     * @Date 2023/1/30 16:17
     */
    @Override
    public void saveOrder(Order order) {
        orderMapper.saveData(order);
    }

    /**
     * 查询列表
     *
     * @Description 查询列表
     * @Return java.util.List<com.button.springbootclickhouse.entity.Order>
     * @Author Administrator
     * @Date 2023/1/30 16:18
     **/
    @Override
    public List<Order> getOrderList() {
        return orderMapper.selectList();
    }
}
